package com.cn.service;

import com.cn.mapper.StorageMapper;
import com.cn.tcc.StorageTCCAction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class StorageServiceImpl implements StorageService {
   /* @Autowired
    private StorageMapper storageMapper;*/
    @Autowired
    private StorageTCCAction storageTCCAction;
    @Transactional
    @Override
    public void decrease(Long productId, Integer count) {
        storageTCCAction.prepare(null, productId, count);
    }
}
